package com.zhuangwei.sell.service;

import com.zhuangwei.sell.dataobject.ProductInfo;
import com.zhuangwei.sell.dto.CartDto;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * @author LeviCoder
 * @create 2019-02-28 23:08
 */
public interface ProductService {

    ProductInfo findOne(String productId);

    List<ProductInfo> findUpAll();

    Page<ProductInfo> findAll(Pageable pageable);

    ProductInfo save(ProductInfo productInfo);

    // 加库存
    void increaseStock(List<CartDto> cartDtoList);

    // 减库存
    void decreaseStock(List<CartDto> cartDtoList);

}
